package Properties.T3;

import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

public class T3 {

    public static void main(String[] args) throws IOException {

        Map<String,String>map = new HashMap<>();
        map.put("pid","10");
        map.put("name","张三");
        map.put("age","18");

        Properties pro = new Properties();
        pro.putAll(map);

        FileOutputStream fos = new FileOutputStream("mapdata.properties");
        pro.store(fos,null);
        fos.close();

    }
}
